package com.kunyi.web.service.identity.code.config;

import com.kunyi.web.service.identity.code.service.SegmentService;
import com.kunyi.web.service.identity.db.service.ILeftAllocService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName KyIDSegmentServiceConfiguration
 * @Description 自动装配SegmentService
 * @Author zhenguo.zhuang
 * @Date 2024/7/5 16:44
 * @Version 1.0
 */
@Configuration
@MapperScan("com.kunyi.web.service.identity.db.mapper")
public class KyIDSegmentServiceConfiguration {

    @Autowired
    private ILeftAllocService leftAllocService;


    @Bean
    public SegmentService initLeafSegmentStarter() throws Exception{
        SegmentService segmentService = new SegmentService(leftAllocService);
        return segmentService;
    }

}
